package org.basic.mail.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.basic.common.core.validate.AddGroup;
import org.basic.common.core.validate.EditGroup;
import org.basic.common.mybatis.core.domain.BaseEntity;
import org.basic.mail.domain.SysMailTemplate;

/**
 * 邮件模版业务对象 sys_mail_template
 *
 * @author Shao Hua
 * @date 2023-07-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysMailTemplate.class, reverseConvertGenerate = false)
public class SysMailTemplateInsertBo extends BaseEntity {
    /**
     * 编号
     */
    private Long id;
    /**
     * 模板名称
     */
    @NotBlank(message = "模板名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 模板编码
     */
    @NotBlank(message = "模板编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 发送的邮箱账号编号
     */
    @NotNull(message = "发送的邮箱账号编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long accountId;

    /**
     * 发送人名称
     */
    private String nickname;

    /**
     * 模板标题
     */
    private String title;

    /**
     * 模板内容
     */
    @NotBlank(message = "模板内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 开启状态
     */
    @NotNull(message = "开启状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 备注
     */
    private String remark;


}
